package lambda;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Optional;


/**
 * @author long
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class People implements Comparable<People>{

    /**
     * id编码
     */
    private Integer id;

    /**
     * 名称
     */
    private String name;

    /**
     * 薪资
     */
    private Double salary;

    /**
     * 部门
     */
    private String department;

    /**
     * 子节点
     */
    private List<String> children;

    @Override
    public int compareTo(People o) {
        return o.getId().compareTo(this.id);
    }

}
